import __00SetRelation as sr
import _00SetFunc as ss

#构建偏序关系和偏序集合
n=4
R=ss.powerset(range(n))
R=sorted(R)
Ps=sr.powerindexparset(R)
H=sr.HasseDiagram(range(len(R)),Ps)
ss.drawgraph(Ps)
ss.drawgraph(H)
print("R",R)
print("len(Ps)",len(Ps),"Ps",Ps)